home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1985 April / 1985-04.d64 / number quest_64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  92 lines

  1. 10 print"[147]";"just a moment..."
  2. 20 poke56,48:clr:k=12288:pc=56334:cp=53272
  3. 40 pokepc,peek(pc)and254:poke1,peek(1)and251
  4. 50 forj=0to4095:pokek+j,peek(53248+j):nextj
  5. 60 fori=216to255:reada%:pokek+i,a%:nexti:fori=280to295:reada%:pokek+i,a%:nexti
  6. 70 poke1,peek(1)or4:pokepc,peek(pc)or1
  7. 80 pokecp,21:bc=53280:bk=53281:pokebc,2:pokebk,1:print"[147]"
  8. 90 printspc(90)"[144]  [167][205][165][165][167][167][205][206][165][207][165][207] [207][165]"
  9. 100 print"            [167] [165][204][186][167]  [165][207][165][207] [207][165]"
  10. 110 printtab(21)"[163] [163]"
  11. 120 print:print"             [207][208] [165][167] [207] [207] [208][207]"
  12. 130 print"             [204][186][187][204][186] [207] [208] [167][165]"
  13. 140 printtab(19)"[163] [163]"
  14. 150 printspc(131)"press the f1 key"
  15. 160 v=54272:forsl=vtov+24:pokesl,0:next
  16. 170 pokev+5,88:pokev+4,33:pokev+24,143:pokev+6,195
  17. 180 readlf,hf,dr:iflf=-1then200
  18. 190 pokev,lf:pokev+1,hf:fort=1todr:nextt:goto180
  19. 200 pokev,0:pokev+1,0:pokev+24,0
  20. 210 geta$:ifa$=""then210
  21. 220 ifa$=chr$(133)then240
  22. 230 goto210
  23. 240 print"[147]":pokebc,7:pokebk,15
  24. 250 printspc(211)"[144]you have 5 [144]turns":printspc(51)"to guess a number"
  25. 260 printspc(51)"[144]from 10 [144]to 100":printspc(211)"press the f1 key"
  26. 270 geta$:ifa$=""then270
  27. 280 ifa$=chr$(133)then300
  28. 290 goto270
  29. 300 print"[147]":pokebc,6:pokebk,1:tn=1:pokecp,(peek(cp)and240)+12
  30. 310 printspc(92)"guess the number"
  31. 320 print:printtab(24)"[144][\":print"":printtab(19)"[144]]"
  32. 330 print"[144]]]]]]]]]]]]]]]]]]]]]]]]]]^^^^[144]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]";
  33. 340 for t= 1to2
  34. 350 print"[144]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]";
  35. 360 next
  36. 370 forn=0to40:poke1983+n,29:poke56255+n,0:nextn
  37. 380 print"[145][145][145][145][145][145][145][145][145][145][145][145][145][145][145]"
  38. 390 r=int(rnd(1)*90+10)
  39. 400 print"[144]     turn: ";"";tn:print
  40. 410 print"     ";
  41. 420 s$="":inputs$:s=val(s$):ifs<1ors>100thengosub690:print"";:goto400
  42. 430 for u= 1 to len(s$):ut=asc(mid$(s$,u,1))
  43. 440 if ut<48orut>57then u=len(s$):gosub690:next:print"";:goto400
  44. 450 next
  45. 460 if s>2 then490
  46. 470 print"[144]  that's too easy":for t=0to1000:next:print"[145]                  [145][145]"
  47. 480 goto410
  48. 490 ifs=rthen780
  49. 500 tn=tn+1:iftn=6then530
  50. 510 ifs>rthen610
  51. 520 ifs<rthen630
  52. 530 pokev+24,143:form=60to30step-2:pokev,int(m/3):pokev+1,m:fort=1to10:nextt
  53. 540 nextm:pokev+24,0
  54. 550 p=14:gosub710:pokex,36:pokecx,6:pokex+40,30:pokecx+40,6
  55. 560 form=125to15step-5:pokev+24,m:fort=1to20:nextt:nextm:pokev+24,0
  56. 570 print"[147]":pokesc,216:printspc(210)"[144]sorry, you  missed"
  57. 580 printspc(130)"the number was ";r
  58. 590 printspc(49)"[144]better luck next time":foru=1to 1200:nextu
  59. 600 goto850
  60. 610 d=int(s/r):d$="high":ifd<=1then680
  61. 620 goto640
  62. 630 d=int(r/s):d$="low":ifd<=1then680
  63. 640 print" ";d;"[144] times too ";"";d$
  64. 650 pokev+24,143:form=50to0step-1:pokev,int(m/2):pokev+1,m:nextm
  65. 660 fort=1to600:next:pokev+24,0
  66. 670 print"[145]                   ":print"[145][145][145][145][145]":goto400
  67. 680 print"    too ";"";d$:fort=1to400:next:goto650
  68. 690 print"     try 1-100  ":fort=1to800:nextt
  69. 700 print"[145]              ":print"[145][145][145][145][145]";:return
  70. 710 x=1024+(5*40)+26:cx=x+54272:z=1024+(5*40)+24:cz=z+54272
  71. 720 forn=1top:pokez,32:pokez+1,32:pokex,32:pokex+40,32
  72. 730 pokez-1,27:pokecz-1,0:pokez,28:pokecz,0
  73. 740 pokex+40,31:pokecx+40,2:pokex+80,35:pokecx+80,0
  74. 750 z=z-1:cz=cz-1:x=x+40:cx=cx+40:nextn:return
  75. 760 bl=53265:forn=1to6:pokebl,peek(bl)and239:fort=1to50:nextt
  76. 770 pokebl,peek(bl)or16:fort=1to40:nextt:nextn:return
  77. 780 gosub760:p=5:gosub710:forn=1to7
  78. 790 pokex,32:pokex+40,32
  79. 800 pokex+39,31:pokecx+39,2:pokex+79,35:pokecx+79,0:x=x+39:cx=cx+39:nextn
  80. 810 pokev+24,143:form=30to60:pokev,int(m/2):pokev+1,m:fort=1to10:nextt:nextm
  81. 820 pokev+24,0:pokev,0:pokev+1,0
  82. 830 print"[147]":pokebc,2:pokebk,1:print:print:printspc(130)"[144]**congratulations**"
  83. 840 printspc(173)"you guessed it"
  84. 850 printspc(191);
  85. 860 for q= 1to 1000:next:tn=1:goto300
  86. 870 data255,1,1,1,127,255,255,127,255,0,0,3,3,255,255,0
  87. 880 data255,255,255,255,255,255,255,255,170,170,255,255,255,255,255,255
  88. 890 data60,126,255,255,129,66,36,24,16,18,60
  89. 900 data88,40,36,66,0,17,130,68,37,6,148,93,126
  90. 910 data31,21,200,30,25,450,31,21,200,96,22,200,30,25,200,96,22,200,31,21,200
  91. 920 data30,25,500,-1,-1,-1
  92.